//
//  MineSimpleTbvCell.m
//  XLDoctor
//
//  Created by longma on 2018/8/2.
//  Copyright © 2018年 XLH. All rights reserved.
//

#import "SelectMemberTbvCell.h"

@implementation SelectMemberTbvCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    [self.selectButton setImage:MJUIImageMake(@"icon_noyes") forState:0];
    [self.selectButton setImage:MJUIImageMake(@"icon_gou") forState:UIControlStateSelected];

}

- (void)setModel:(PatientModel *)model{
    _model = model;
   
    self.titleLabel.text = model.patientName;
    self.subTitleLabel.text = [NSString stringWithFormat:@"%@ / %ld",MJUILocalizedString(model.gender),model.age];
    
    if(model.isSelect){
        self.titleLabel.textColor = UIColor.mj_appColor;
        self.subTitleLabel.textColor = UIColor.mj_appColor;
        self.itemView.backgroundColor = [UIColor mj_colorWithHexString:@"#C9EFF4"];
        self.dotLabel.hidden = false;

    }else{
        self.titleLabel.textColor = UIColor.mj_blackColor;
        self.subTitleLabel.textColor = UIColor.mj_grayColor;
        self.itemView.backgroundColor = UIColor.mj_whiteColor;
        self.dotLabel.hidden = true;
    }
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    
}
@end
